Information distribution system, terminal apparatus used in such system, recording medium on which program is recorded, and loop connection avoidance method

ABSTRACT

In order that a loop does not occur when switching upstream terminal apparatus, to provide an information distribution system capable of preemptively detecting a distribution route loop, and avoiding the loop, a terminal apparatus and a program used in the same system, as well as a loop connection avoidance method. 
     A terminal apparatus B which has received loop connection detection information from upstream determines whether or not a downstream terminal apparatus of a control path which is not a distribution route along which contents information is flowing, and a source of the loop connection detection information match and, in the event that they match, determines that a loop will occur. By this means, it is possible to determine in advance that a loop will occur, before switching an upstream connection destination. Also, substitute upstream terminal apparatus search information is transmitted in a downstream direction from terminal apparatus B 0  and B 1 , which are second nodes, and a terminal apparatus B which has received the substitute upstream terminal apparatus search information, but has not received the loop connection detection information, is made a substitute upstream apparatus. By switching to the substitute upstream apparatus, it is possible to avoid the loop.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based on and claims the benefit of priority fromJapanese Patent Application No. 2007-121199, filed on May 1, 2007; theentire contents of which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an information distribution system, aterminal apparatus used in the same system and a recording medium onwhich a program is recorded, as well as a loop connection avoidancemethod, and particularly to an information distribution system whichdistributes contents information in a network in which a plurality ofterminal apparatus are mutually connected by forming the duplicated treetopology, a terminal apparatus used in the same system and a recordingmedium on which a program is recorded, as well as a loop connectionavoidance method.

2. Description of the Related Art

To date, there is a technology called an ALM (Application LayerMulticast), which carries out a relay distribution of information on acontents stream (hereafter referred to as contents information), whilemanaging a contents distribution route in an application layer. Thistechnology is one which distributes the contents information by carryingout a P2P (Peer to Peer) communication between nodes (hereafter referredto as terminal apparatus) such as personal computers or STB (Set TopBox) apparatus.

In this kind of ALM technology, depending on differences in adistribution topology management method and construction method, theyare divided into the following kinds of method. That is, depending onthe differences in the distribution topology management method, they aredivided into a hybrid type P2P and a pure type P2P method, whiledepending on the differences in the distribution topology constructionmethod, they are divided into a Mesh-First approach, a Tree-Firstapproach and an Implicit approach method.

The hybrid type P2P is a method in which a designated server apparatusmanages common topology information, while the pure type P2P is a methodin which individual terminal apparatus manage partial topologyinformation. Also, the Mesh-First approach is a method in which terminalapparatus construct a mesh-shaped topology, and select a distributionroute for distributing a data stream therefrom by means of an RPF(Reverse Path Forwarding) or the like, the Tree-First approach is amethod in which terminal apparatus construct a tree-shaped topology,from which each terminal apparatus searches for an adjacent terminalapparatus, and renders redundant a spare distribution route, and theImplicit approach is a method in which terminal apparatus construct acontrol data topology using a specific metric, and make that itself adistribution route (a method of an approach by which a tree and a meshare made simultaneously).

The mesh type topology, not being limited to a technology field of theheretofore described ALM, is also employed in a technology field of anIP multicast or a LAN. In the mesh type topology, as it is constructedof a tight control communication network in which a certain terminalapparatus has a connection relationship with a plurality of terminalapparatus, a duplicated topology is constructed in order to guaranteecontinual operations, even in a case in which a connection betweenterminal apparatus is cut off and a stream cut off event occurs.

However, in the event that the connection between the terminal apparatusis cut off, reconstructing the distribution route randomly will resultin a loop connection occurring in a distribution route. Therein, as amethod of avoiding this kind of distribution route loop connection,there is, for example, the one described in Japanese Unexamined PatentPublication No. 2000-49779. Although the method in the patentpublication does not target duplicated mesh type topology, in thetechnology field of the ALM, which has a mesh type topology, adistribution route between a root terminal apparatus and a targetedterminal apparatus (a root path) is sought by sending a packet whichstores route information along the distribution route, and a loopconnection is detected by confirming that the targeted terminalapparatus is not included in the root path. Then, in an upstreamselection process when an upstream terminal apparatus is reconnected, byselecting an upstream terminal apparatus having a root path which doesnot include the own terminal apparatus itself, the loop connection isavoided.

The heretofore described method of Japanese Unexamined PatentPublication No. 2000-49779, in the event of finding an upstreamsubstitute node in order to avoid a distribution route loop, uses aprotocol which transmits a search message in an upstream direction froma targeted terminal apparatus. For this reason, in the event that aplurality of terminal apparatus attempt to widen a search range andexecute a process, there has been a problem in that search messagesconcentrate in an upstream terminal apparatus, and a processing loadincreases.

SUMMARY OF THE INVENTION

Therein, it is desirable to, in a case of forming a contentsdistribution route based on a topology in which trees are duplicated, inorder that a loop connection does not occur when switching upstreamterminal apparatus, provide an information distribution system capableof preemptively detecting a distribution route loop connection, andavoiding the loop connection, a terminal apparatus used in the samesystem and a recording medium on which is stored a program, as well as aloop connection avoidance method.

According to one aspect of the invention, there is provided a terminalapparatus in an information distribution system which includes: aninformation distribution apparatus which distributes contentsinformation via a network; and a plurality of the terminal apparatuswhich, being connected to the network, receive the contents informationdistributed from the information distribution apparatus, and in which aplurality of hierarchical structures, formed by the plurality ofterminal apparatus being logically connected in multiple layers with theinformation distribution apparatus as an apex, are provided on thenetwork, and each terminal apparatus, in a condition in which itparticipates in at least two of the hierarchical structures, receivesthe contents information from an upstream terminal apparatus connectedto itself in one hierarchical structure. The terminal apparatusincludes: a controller which, when its own apparatus switches theupstream terminal apparatus (connected to its own apparatus in the onehierarchical structure and provides the contents information) to anotherupstream terminal apparatus (connected to its own apparatus in anotherhierarchical structure), avoids a loop connection occurring in adistribution route of the contents information. The controller includes:a loop detection information transmitter which transmits loop connectiondetection information, including identification information foridentifying its own apparatus, to a downstream terminal apparatus,connected to its own apparatus; a loop detection information receiverwhich receives the loop connection detection information; a loopdetection information relay which relays the received loop connectiondetection information to the downstream terminal apparatus, connected toits own apparatus; a downstream terminal determiner which determineswhether or not a terminal apparatus corresponding to the received loopconnection detection information is a downstream terminal apparatusconnected to its own apparatus in the plurality of hierarchicalstructures; a loop avoidance instruction transmitter which, in the eventthat it is determined, by the downstream terminal determiner, that it isa downstream terminal apparatus connected to its own apparatus,transmits loop connection avoidance instruction information, whichinstructs an avoidance of a loop connection, to the terminal apparatuscorresponding to the loop connection detection information; and a loopavoidance instruction receiver which receives the loop connectionavoidance instruction information. In this case, the controller, bychanging the upstream terminal apparatus from the terminal apparatuswhich has transmitted the loop connection avoidance instructioninformation to another terminal apparatus, avoids a loop connectionoccurring in a distribution route of the contents information.

According to the invention, it is possible to detect an occurrence of aloop connection in a distribution route, based on the loop connectiondetection information. Consequently, as a terminal apparatus which isattempting to switch an upstream connection destination in ahierarchical structure switches, in place of a terminal apparatus wherea loop connection will occur, to another terminal apparatus where noloop connection occurs, it is possible to preemptively avoid the loopconnection occurring in the distribution route. Also, as the terminalapparatus, in order to detect an occurrence of a loop connection,transmits loop connection detection information toward downstreamterminal apparatus, it not happening that the loop connection detectioninformation concentrates in a specific terminal apparatus, it ispossible to reduce the processing load.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram showing a basic configuration of an informationdistribution system in an embodiment;

FIG. 2 is a diagram showing a terminal apparatus participationprocedure;

FIG. 3 is a diagram showing an example of distribution routes andcontrol paths in a mesh type topology;

FIG. 4 is a diagram showing the control paths in FIG. 3;

FIG. 5 is a diagram showing one portion of the distribution routes inFIG. 3;

FIG. 6 is a diagram showing a method of detecting a loop of adistribution route;

FIG. 7 is a diagram showing a method of searching for a substituteupstream node;

FIG. 8 is a diagram showing a reconnection process after searching forthe substitute upstream node;

FIG. 9 is a diagram showing a configuration of the terminal apparatusaccording to the embodiment;

FIG. 10 is a diagram showing a configuration of a connection candidateintroduction apparatus;

FIG. 11A is a diagram showing a process flow (1/4) of the terminalapparatus according to the embodiment;

FIG. 11B is a diagram showing a process flow (2/4) of the terminalapparatus according to the embodiment;

FIG. 11C is a diagram showing a process flow (3/4) of the terminalapparatus according to the embodiment;

FIG. 11D is a diagram showing a process flow (4/4) of the terminalapparatus according to the embodiment; and

FIG. 12 is a diagram showing a process flow of the connection candidateintroduction apparatus.

DESCRIPTION OF THE PREFERRED EMBODIMENT

Hereafter, a specific description will be given, referring to thedrawings, of an embodiment of the invention. FIG. 1 is a diagram showinga basic configuration of an information distribution system in theembodiment of the invention. FIG. 2 is a diagram showing a procedure ina case in which a terminal apparatus newly participates in theinformation distribution system, in the information distribution systemshown in FIG. 1. FIG. 3 is a diagram showing an example of distributionroutes and control paths in a mesh type topology formed by duplicating atree. FIG. 4 is a diagram showing the control paths in the mesh typetopology shown in FIG. 3, while FIG. 5 is a diagram showing thedistribution routes. FIG. 6 is a diagram showing a method of detecting acircular connection (hereafter called a loop) of a distribution route,which occurs in a case of switching an upstream connection destination.FIG. 7 is a diagram showing a method of searching for a substituteupstream terminal apparatus in which no loop occurs, in place of aterminal apparatus in which a loop occurs, in order to avoid the loop ofthe distribution routes. FIG. 8 is a diagram showing a reconnectionprocess after finding the substitute upstream terminal apparatus. FIG. 9is a diagram showing a configuration of the terminal apparatus, whileFIG. 10 is a diagram showing a configuration of a connection candidateintroduction apparatus. FIGS. 11A to 11D are diagrams showing a processflow in the terminal apparatus, while FIG. 12 is a diagram showing aprocess flow in the connection candidate introduction apparatus.

Outline of Information Distribution System

Firstly, with regard to an outline of the information distributionsystem in the embodiment of the invention, a description of the basicconfiguration and processes thereof will be given. FIG. 1 is a diagramshowing the basic configuration of the information distribution system.This information distribution system S is configured including aninformation distribution apparatus A, a plurality of terminal apparatusB, and a connection candidate introduction apparatus C. The informationdistribution apparatus A distributes contents information to theterminal apparatus B. The terminal apparatus B, being apparatus on whicha user can view the contents information, are provided dispersed on aninternet, which forms the mesh type topology, and have a node managementtable in which is stored connection information relating to upstreamterminal apparatus B and downstream terminal apparatus B. The connectioncandidate introduction apparatus C has a topology database, in which isstored topology management information of the terminal apparatus B, aswell as a terminal management database, in which is stored locationinformation (IP addresses and port numbers) and the like of theinformation distribution apparatus A and the terminal apparatus B and,as well as managing a connection condition thereof, introduces aterminal apparatus B nearest to an upstream side (an upstream apparatus)which can relay the contents information in a case in which a terminalapparatus newly participates in the mesh type topology.

The information distribution apparatus A and terminal apparatus B0 andB1 being installed OK, for example, in a broadcasting station facility,the terminal apparatus B0 is a second node positioned in a 0 system treeroute, while the terminal apparatus B1 is a second node positioned in a1 system tree route. Two upstream apparatus being connected to each ofterminal apparatus B2 to BD, the mesh type topology is formed byduplicating two trees to which the terminal apparatus B are connected.Providing two upstream apparatus which are reception sources of thecontents information and forming a duplication in this way is done inorder to reduce an effect of the distribution of the contentsinformation being cut off in a case in which a terminal apparatus Bwithdraws.

Also, the plurality of terminal apparatus B forming the mesh typetopology under a control of the connection candidate introductionapparatus C, the contents information distributed from the informationdistribution apparatus A is relayed to all of the terminal apparatus Bby forming a distribution route for the contents information in thetopology. Also, each terminal apparatus B manages information on anearest terminal apparatus B connected upstream (upstream apparatusconnection information), and information on a nearest terminal apparatusB connected downstream (downstream apparatus connection information), bymeans of its node management table. When expressing the mesh typetopology formed by the plurality of terminal apparatus B as a physicaltopology, it becomes a configuration in which the terminal apparatus Bare connected, via routers, on the internet, as shown in FIG. 1.

Participation in Topology

Next, referring to FIG. 2, a description will be given of a procedure bywhich a terminal apparatus BE newly participates in the mesh typetopology. On the terminal apparatus BE transmitting, as a trigger forthe new participation of the terminal apparatus BE, an “upstream nodeintroduction request message” to the connection candidate introductionapparatus C (1 in FIG. 2), the connection candidate introductionapparatus C retrieves the topology management information stored in thetopology database, searches for apparatus, among the terminal apparatusB of the information, which can connect the terminal apparatus BE to itsdownstream side, and returns a “search result” (upstream apparatuscandidates/for example, terminal apparatus BA and BB) to the terminalapparatus BE (2 in the same figure). Herein, as the terminal apparatusBE newly participates in the duplicated mesh type topology, it isnecessary to provide two control paths to differing upstream apparatus.Consequently, the connection candidate introduction apparatus Ctransmits two upstream apparatus candidates to the terminal apparatus BEas the “search result”. In this case, it is desirable that theconnection candidate introduction apparatus C, as far as possible,searches for two upstream apparatus candidates positioned on the samehierarchical level, for the purpose of reducing a probability of a loopoccurring when the terminal apparatus BE switches the upstreamconnection destination. Herein, the hierarchical level refers to ahierarchical position in a tree structure, with the informationdistribution apparatus A as a base, in a direction of terminal apparatusB on a downstream side. For example, as the terminal apparatus BA and BBare positioned on a fourth level counting from the informationdistribution apparatus A, they exist on the same hierarchical level.

Then, the terminal apparatus BE tries to connect by transmitting a“connection request message” to each of the terminal apparatus BA andBB, which are the two upstream apparatus candidates acquired from theconnection candidate introduction apparatus C (3 and 4 in the samefigure). The terminal apparatus BA and BB, on receiving the “connectionrequest message”, add information on the terminal apparatus BE to thenode management table which they manage internally, and return a“connection response message” to the terminal apparatus BE.

The terminal apparatus BE, on receiving the “connection responsemessage”, selects one of the terminal apparatus BA and BB, and transmitsa “stream start request message” for connecting as a distribution route,to that apparatus (5 in the same figure). The terminal apparatus BE doesnot transmit a “stream start request message” to the other apparatus. Onone of the terminal apparatus BA and BB receiving the “stream startrequest message”, it prepares a stream relay object, and starts astreaming to the terminal apparatus BE (6 in the same figure). Herein,the stream relay object is an object which carries out a processreceiving contents information from an upstream apparatus, and relayingit to a downstream apparatus. In this way, the terminal apparatus BE canparticipate in the mesh type topology with the terminal apparatus BA orBB as the upstream apparatus.

Withdrawal from Topology

Next, a description will be given of a procedure by which the terminalapparatus BE withdraws from the mesh type topology. The terminalapparatus BE, which is to withdraw, transmits a “stream stop requestmessage” to one of the upstream terminal apparatus BA or BB, which is astream information supply source, after which, it transmits a“connection severance request message” to both the terminal apparatus BAand BB.

The terminal apparatus BA or BB, on receiving the “stream stop requestmessage”, invalidates the stream relay object, and stops the streamingto the terminal apparatus BE. Then, on receiving the “connectionseverance request message”, it deletes the information on the terminalapparatus BE from the node management table, and breaks off a connectionrelationship with the terminal apparatus BE. In this way, the terminalapparatus BE can withdraw from the mesh type topology.

Herein, in the terminal apparatus BE which is to withdraw from the meshtype topology, in the event that a terminal apparatus exists downstreamthereof, a restoration of the distribution route is carried outaccording to one of methods a and b below.

a. Reproduction According to Timeout Method

The downstream terminal apparatus constantly monitors a condition of astreaming from the upstream terminal apparatus BE and, with a streamsupply being cut off for a certain time as a trigger, invalidates aconnection condition with the terminal apparatus BE, which is theupstream apparatus, and connects to a new upstream apparatus.

b. Reproduction According to Event Report Method

The terminal apparatus BE, when withdrawing from the mesh type topology,reports a withdrawal event toward the downstream terminal apparatus. Thedownstream terminal apparatus, on receiving the report of the withdrawalevent from upstream, invalidates the connection condition with theterminal apparatus BE, which is the upstream apparatus, and connects toa new upstream apparatus.

Embodiment

Next, a detailed description will be given of the embodiment of theinvention. FIG. 3 is a diagram showing, for the mesh type topologyformed by duplicating the tree, an example of distribution routes andcontrol paths thereof. As shown in FIG. 3, the information distributionsystem S constructs the 0 system tree and the 1 system tree, headed bythe information distribution apparatus A, and forms the mesh typetopology by each terminal apparatus B2 to BF participating dually inboth trees. That is, the information distribution system S is one whichprovides a plurality of hierarchical structures formed by a plurality ofterminal apparatus B being logically connected in multiple layers, withthe information distribution apparatus A as an apex, and each terminalapparatus B, in a condition in which it participates in at least twohierarchical structures, receives contents information from an upstreamapparatus connected to itself in one hierarchical structure. Theinformation distribution apparatus A being a contents source, a terminalapparatus B0, which is a route of the 0 system tree, and a terminalapparatus B1, which is a route of the 1 system tree, exist as secondnodes downstream thereof. Also, for example, in the terminal apparatusB2, two control paths for the terminal apparatus B0 and B5 existing onan upstream side thereof, an active system distribution route, which isa 0 system connection, is formed with the terminal apparatus B0, and acontrol path which could become a standby system distribution route,which is a 1 system connection, is formed with the terminal apparatusB5.

FIG. 4 is a diagram showing the control paths in FIG. 3. In FIG. 3, abroad arrow with a circle and a thin arrow with a circle indicate a 0system distribution route and a 0 system control path respectively,while a broad arrow with no circle and a thin arrow with no circleindicate a 1 system communication route and a 1 system control pathrespectively. Also, the distribution routes indicate routes of acontents information flow, while the control paths indicate distributionroutes of a control message used in a distribution of contentsinformation, in order to maintain a connection relationship of the meshtype topology. Also, a number (0 to F) of each terminal apparatus Bindicates a node number of the terminal apparatus B.

FIG. 5 is a diagram showing one portion of the distribution routes inFIG. 3. Now, as shown in FIG. 5, it is taken that contents informationfrom the information distribution apparatus A is being supplied to eachterminal apparatus B via the 0 system connection distribution route andthe 1 system connection distribution route. Herein, in the event that, astream interruption event occurring in the supply of the contentsinformation from the terminal apparatus B0 to the terminal apparatus B3,the terminal apparatus B3 switches from the terminal apparatus B0 of theactive system, established on the upstream side, to the terminalapparatus B4 of the standby system, also established on the upstreamside, a distribution route loop occurs. Therein, in the embodiment ofthe invention, the occurrence of the distribution route loop is detectedin advance, and the loop is avoided. Hereafter, a detailed descriptionwill be given of these procedures.

Loop Detection Procedure for Standby System Upstream Apparatus

Firstly, a description will be given of a procedure for detecting adistribution route loop for a standby system upstream apparatus. Theloop detection is carried out in advance, before carrying out a switchfrom the active system to the standby system. Each terminal apparatus Bspecifies all terminal apparatus in a downstream direction which,connected to the apparatus B itself, receive contents information andform a distribution route, and transmits an own apparatus designated“loop detection packet”, including a node identifier (node ID), asequence number and location information (an IP address and the like)for identifying the apparatus itself, at a certain interval (forexample, every ten minutes). In FIG. 6, the terminal apparatus B3 istransmitting a “loop detection packet” to a downstream side distributionroute along which the contents information is flowing.

On receiving the “loop detection packet” from upstream, the terminalapparatus B, in the case only that there is a distribution routedownstream of the apparatus itself, forwards the “loop detection packet”to the downstream distribution route. At the same time, it stores areception event of the “loop detection packet” (for example, a node ID,location information, sequence number and reception time of adistribution source) for a certain time (for example, the same tenminutes as the transmission interval of the “loop detection packet”) ina loop detection packet registration table managed inside the apparatusitself, as shown in Table 1.

Table 1: Example of Loop Detection Packet Registration

TABLE Location Sequence Node ID Information Number Reception Time Node 1218.227.161.67 56 2006 Dec. 10 12:00:00 Node 3 61.47.100.3 55 2006 Dec.10 12:00:32 Node 12 220.230.23.39 58 2006 Dec. 10 12:00:12 Node 32170.38.221.31 50 2006 Dec. 10 12:00:29 Node 159 218.220.67.3 32 2006Dec. 10 12:01:00

A terminal apparatus B which receives the “loop detection packet” fromupstream, in a case in which a downstream terminal apparatus B, which ison a downstream side seen from the apparatus itself, and connected to acontrol path which is not a distribution route of the active system, isa source of the “loop detection packet”, determines that there is apossibility of a loop occurring involving the source and standby systemupstream apparatus. In FIG. 6, the terminal apparatus B4, which hasreceived the “loop detection packet” from upstream, recognizes from itsnode management table that the terminal apparatus which is connecteddownstream to a control path which is not a distribution route of theactive system is the terminal apparatus B3, recognizes from the node IDof the received “loop detection packet” that the source is the terminalapparatus B3 and, as they match, determines that, in the event that theterminal apparatus B3, which is the source, switches to the upstreamterminal apparatus B4 of the standby system, a loop will occur in adistribution route from the terminal apparatus B3 to the terminalapparatus B4, and from the terminal apparatus B4 to the terminalapparatus B3.

Then, the terminal apparatus B which has detected the loop in thedistribution route with the standby system upstream apparatus transmitsa “loop avoidance instruction message” to the source of the “loopdetection packet”, so as to avoid the loop. In FIG. 6, the terminalapparatus B4 is transmitting the “loop avoidance instruction message” tothe terminal apparatus B3, which is the source.

In this way, as the terminal apparatus B3 which is connected downstreamto a standby system distribution route which is a control path which isnot a distribution route of the active system, and the terminalapparatus B3 which is the source of the “loop detection packet” match,the terminal apparatus B4, which has received the “loop detectionpacket” from upstream, determines that a loop will occur with theterminal apparatus B3, which is the source, in the distribution route inthe standby system. By this means, the terminal apparatus B3 candetermine in advance that a loop will occur in the standby system, inthe event of switching the upstream apparatus from the active system tothe standby system, before actually switching.

Procedure of Switching to Substitute Upstream Apparatus After LoopDetection

Next, a description will be given of a procedure of switching to anupstream terminal apparatus (a substitute upstream apparatus) with whicha loop does not occur, after detecting the loop in the distributionroute in the standby system. The terminal apparatus B, on receiving the“loop avoidance instruction message”, transmits an own apparatusdesignated “substitute upstream node search packet request message”,including a node identifier (node ID), sequence number and locationinformation (an IP address and the like) of the apparatus itself towardthe second node of the 0 system or the 1 system (the terminal apparatusB0 or the terminal apparatus B1), making a broadcast request for atransmission of a “substitute upstream node search packet”. In FIG. 7,the terminal apparatus B3 is transmitting a broadcast request for a“substitute upstream node search packet” to the terminal apparatus B1,which is the second node (1 in FIG. 7).

The terminal apparatus B0 and B1, which are the second nodes, onreceiving a “substitute upstream node search packet request message” (abroadcast request for a “substitute upstream node search packet”),transmit a “substitute upstream node search packet”, via control pathsof all terminal apparatus B in a downstream direction. The terminalapparatus B, on receiving the “substitute upstream node search packet”from upstream, in the case only that there is a control path downstreamof the apparatus itself, forwards the “substitute upstream node searchpacket” to the downstream control path.

Also, the terminal apparatus B which has received the “substituteupstream node search packet”, at the same time, in the event that a nodeID the same as that of the source of the received “substitute upstreamnode search packet” is not registered in a loop detection packetregistration table managed inside the apparatus itself, determines thatthe apparatus itself could become the substitute upstream apparatus ofthe source. Then, that terminal apparatus B transmits a “substituteupstream node connection permission message” to the source. In FIG. 7,the terminal apparatus B2, determining that the apparatus itself couldbecome the substitute upstream apparatus of the terminal apparatus B3,which is the source, is transmitting the “substitute upstream nodeconnection permission message” to the terminal apparatus B3, which isthe source (2 in the same figure).

The terminal apparatus B, on receiving the “substitute upstream nodeconnection permission message”, switches a standby system upstreamapparatus control path of the apparatus itself to the source of the“substitute upstream node connection permission message”. In FIG. 8, theterminal apparatus B3, receiving the “substitute upstream nodeconnection permission message” from the terminal apparatus B2, switchesthe standby system upstream apparatus control path of the apparatusitself from the terminal apparatus B4 to the terminal apparatus B2,which is the source of the “substitute upstream node connectionpermission message” (3 in FIG. 8).

By this means, as the terminal apparatus B2 does not exist downstream asseen from the terminal apparatus B3, it does not happen that a loopoccurs from the terminal apparatus B3 to the terminal apparatus B2, andfrom the terminal apparatus B2 to the terminal apparatus B3.Consequently, in the information distribution system S, afterdetermining in advance that a loop (a loop with the terminal apparatusB4) will occur in the standby system in the event that the terminalapparatus B3 switches from the active system to the standby system, theterminal apparatus B3, specifying the terminal apparatus B2 as thesubstitute upstream apparatus in the standby system, can switch from theterminal apparatus B4, with which a loop occurs, to the terminalapparatus B2, with which no loop occurs, as the upstream apparatus. Thatis, it is possible to avoid a loop in the distribution route in thestandby system.

Terminal Apparatus

Next, a description will be given of a configuration and processes ofthe terminal apparatus B in the information distribution system S. FIG.9 is a diagram showing the configuration of the terminal apparatus B.The terminal apparatus B, to which a general personal computer isapplicable, is configured including a main power source 202, whichsupplies power to internal instruments and the like, an auxiliary powersource 203, which supplements the main power source 202, a hard discdevice 204, which stores various kinds of information and the like, aCPU (Central Processing Unit) 205, which executes predeterminedprocesses in accordance with a program, a network interface 206, forcarrying out communication, via the internet, with the informationdistribution apparatus A and the connection candidate introductionapparatus C, a rewritable main memory 207, which stores various kinds ofprogram and the like, a peripheral equipment control chip 208, whichcontrols an input portion which inputs predetermined information from auser input remote control 222 in accordance with a user's operation, aninfrared port 209 for inputting the predetermined information from theuser input remote control 222 by means of infrared rays, a video chip210 which, as well as receiving image information from the CPU 205 andwriting it into an internal video memory (not shown), displays theinformation written into the video memory on a built-in display 211, tobe described hereafter, a sound source chip 212, which has an FM(Frequency Modulation) sound source and a Wave Table sound source or thelike, and a speaker 213, which converts an audio signal transmitted fromthe sound source chip 212 into a sound wave. Also, these various kindsof component being mutually connected via a system bus 201, a controller224 is configured of the CPU 205 and the main memory 207. Also, thenetwork interface 206 is connected to the network via a router 223.

Main Memory

Also, a ring buffer 214, which temporarily stores contents informationreceived from the information distribution apparatus A or from anotherterminal apparatus B, a stream control program 215 executed in order to,as well as receiving the stream distributed contents information, fromthe information distribution apparatus A or relayed from anotherterminal apparatus B, relay the received contents information to anotherterminal apparatus B connected downstream, in accordance with an unshownnode management table, a topology control program 216 which, as well ascarrying out a management of location information of upstream anddownstream terminal apparatus B, controls the processes of participatingin and withdrawing from the mesh type topology, in accordance with thenode management table, a loop detection program 217 for detecting a loopin a distribution route and avoiding the loop, an operating systemprogram 218 for providing basic functions of the terminal apparatus B asa computer, a screen control program 219 for controlling the built-indisplay 211, a decoder program 220 for decoding information on encodedstreamed contents, and a loop detection packet registration table 221,which consists of information on a reception event of a “loop detectionpacket” received from an upstream side (refer to Table 1), are stored inthe main memory 207. In the controller 224, the CPU 205 retrieves theseprograms from the main memory 207, and executes functions according toeach program.

Herein, the operating system program 218, by being retrieved andexecuted by the CPU 205, renders executable the basic functions of thecomputer, which is the terminal apparatus B. Then, in a condition inwhich the operating system program 218 is executed by the CPU 205, eachprogram, other than the operating system program 218, stored in the mainmemory 207 is executed.

It is also acceptable that each program in the main memory 207 is, forexample, downloaded from a server, or the like, connected to theinternet, and stored, and it is also acceptable that, after beingrecorded on a storage medium such as a CD-ROM, they are retrieved via adrive of the recording medium, and stored.

Also, in the embodiment of the invention, each program, such as thestream control program 215, the topology control program 216 and theloop detection program 217, is stored individually, but it is alsoacceptable that these programs are stored in the main memory 207 as oneinformation distribution system program.

Controller

The controller 224, being configured, as heretofore described, of theCPU 205 and main memory 207, centrally controls a whole of the terminalapparatus B by the CPU 205 retrieving and executing the various kinds ofprogram stored in the main memory 207. In particular, in the embodimentof the invention, in order, when the terminal apparatus B switches theupstream apparatus from the active system to the standby system, toavoid a loop occurring in a distribution route of the standby system,the controller 224 functions as a loop detection informationtransmitter, which transmits a “loop detection packet (loop connectiondetection information)”, a loop detection information receiver, whichreceives a “loop detection packet”, a loop detection information relay,which relays a “loop detection packet”, a downstream terminaldeterminer, which determines whether or not an apparatus is a downstreamapparatus, a loop avoidance instruction transmitter, which transmits a“loop avoidance instruction message (loop connection avoidanceinstruction information)”, a loop avoidance instruction receiver, whichreceives a “loop avoidance instruction message”, a loop detectioninformation memory, which stores a “loop detection packet”, a searchinformation distribution request transmitter, which transmits a“substitute upstream node search packet distribution request message (asearch information distribution request)”, a search informationdistribution request receiver, which receives a “substitute upstreamnode search packet distribution request message”, a search informationdistributor, which distributes a “substitute upstream node search packet(substitute upstream terminal apparatus search information)”, a searchinformation receiver, which receives a “substitute upstream node searchpacket”, a search information relay, which relays a “substitute upstreamnode search packet”, a connection permission transmitter, whichtransmits a “substitute upstream node connection permission message(substitute upstream terminal apparatus connection permissioninformation)”, a connection permission receiver, which receives a“substitute upstream node connection permission message”, and asubstitute upstream terminal connector, which carries out a connectionto a substitute upstream apparatus.

Hereafter, a detailed description will be given of processes of thecontroller 224 furnished in the terminal apparatus B, using FIGS. 11-1to 11-4.

Initialization

In step S01, on the terminal apparatus B being started up by the mainpower source 202, each kind of program stored in the terminal apparatusB is initialized. After the initialization of each kind of program iscompleted, in step S02, the terminal apparatus B, a participationrequest from the user via the user input remote control 222 being input,starts a procedure for participating in the mesh type topology whichcarries out the distribution of contents information, with theparticipation request as a trigger.

Completion

In step S14, after a process finishing each type of program has beenperformed, with a turning off of the main power source 202 of theterminal apparatus B as a trigger, the controller 224, in step S15,completes the finishing process by turning off the auxiliary powersource 203.

Participation in Topology

With the request to participate in the topology as the trigger, theterminal apparatus B starts the participation procedure. Specifically,in step S13, the controller 224 transmits an “upstream node introductionrequest message” to the connection candidate introduction apparatus C,and waits for a reception of an upstream apparatus candidate (aresponse) as a “search result”.

In steps S16 to S18, the controller 224, on receiving an upstreamapparatus candidate from the connection candidate introduction apparatusC as the “search result”, transmits a “connection request message” and a“stream request message” to the upstream apparatus candidate terminalapparatus. By this means, a session is established between the terminalapparatus which is to participate in the topology and the upstreamapparatus candidate terminal apparatus. In both the 0 system and the 1system, these processes are performed for upstream apparatus.

Then, in step S19, the controller 224 transmits a “stream start requestmessage” to an upstream apparatus, among the upstream apparatus of the 0system and the 1 system, on a lower hierarchical level. Supplyingcontents information from the upstream apparatus on the lowerhierarchical level is done because it is advantageous from a point ofminimizing a delay in transmitting contents information from theinformation distribution apparatus A, and a deterioration in a streamquality. Then, in step S20, the controller 224 transmits a “topologyparticipation report” to the connection candidate introduction apparatusC. By this means, the terminal apparatus B which requests theparticipation can participate in the topology.

Relay and Playback of Contents Information

In the event of receiving a packet of contents information (a contentspacket) from an upstream apparatus (step S21: Yes), the controller 224investigates, in step S22, by means of a node management table, whetheror not a downstream terminal apparatus exists immediately below its ownapparatus. If a downstream apparatus exists, the controller 224, in stepS23, relays the received contents packet, and shifts to step S24. If nodownstream node exists, the controller 224 does not relay the receivedcontents packet. Then, in step S24, the controller 224 decodes thecontents packet by means of the decoder program 220, and plays back thedecoded contents data via the video chip 210 and the sound source chip212.

Withdrawal from Topology

If a withdrawal request from the user via the user input remote control222 is input (step S25: Yes), the terminal apparatus B starts aprocedure for withdrawing from the mesh type topology which carries outthe distribution of contents information, with the withdrawal request asa trigger. In steps S26 to S28, the controller 224 transmits a “streamstop request message” and a “connection break request message” toupstream apparatus of the active system, and a “connection break requestmessage” to upstream apparatus of the standby system. Then, in step S29,the controller 224 transmits a “topology withdrawal report” to theconnection candidate introduction apparatus C. By this means, theterminal apparatus B which requests a withdrawal can withdraw from thetopology.

Participation and Withdrawal of Downstream Terminal Apparatus

In steps S30 to S33, the controller 224, with a participationin/withdrawal from the topology of a downstream apparatus as a trigger,determines whether or not it has received a “connection requestmessage”/“connection break request message” from the downstreamapparatus. Then, in steps S31 and S33, the controller 224, afterreceiving each message, performs a registration in/deletion from thenode management table of information relating to the downstreamapparatus, for the purpose of updating connection information of thedownstream apparatus.

Starting and Finishing of Streaming

In steps S34 to S37, the controller 224, on receiving a “stream startrequest message”/“stream stop request message” from a downstreamapparatus, performs a starting or stopping of a streaming to thedownstream apparatus.

Switching of Upstream Terminal Apparatus

In steps S38 to S40, in the event that some kind of problem hasoccurred, and contents information has ceased to be supplied from anupstream apparatus of the active system, the controller 224 transmits a“stream stop request message” to the upstream apparatus of the activesystem, after which, it transmits a “stream start request message” to anupstream apparatus of the standby system. By this means, a switching ofthe upstream apparatus from the active system to the standby system iscompleted.

Loop Detection for Standby System Upstream Apparatus

The terminal apparatus B, maintaining the predetermined time interval,regularly (for example, at ten minute intervals) repeats aninvestigation of whether or not a loop exists in a distribution routeinvolving standby system upstream apparatus. In steps S41 to S43, thecontroller 224, with a distribution route loop monitoring as a trigger,investigates, by means of the node management table, whether or not adownstream apparatus exists immediately below its own apparatus, andtransmits a “loop detection packet (loop connection detectioninformation)”, including identification information (a node identifier,location information and the like of its own apparatus) for identifyingits own apparatus, from the apparatus equipped with the controller 224to the downstream apparatus receiving the contents information. Thecontroller 224 which executes these kinds of step functions as the loopdetection information transmitter.

In step S44, the controller 224 determines whether or not it hasreceived a “loop detection packet (loop connection detectioninformation)”. The controller 224 which executes this kind of stepfunctions as the loop detection information receiver. Then, if itreceives a “loop detection packet (loop connection detectioninformation)” (step S44: Yes), in step S45, the controller 224, based onidentification information in the “loop detection packet”, determines,with the node management table, whether or not the source is alreadyconnected as a downstream apparatus of its own apparatus. The controller224 which executes this kind of step functions as the downstreamterminal determiner. Then, if it determines that there is already aconnection (if the source of the “loop detection packet” is a downstreamapparatus of its own apparatus), the controller 224 determines, in stepS46, that a loop will occur in a distribution route between its ownapparatus and the source of the “loop detection packet”, and transmits a“loop avoidance instruction message (loop connection avoidanceinstruction information)” to the distribution source. The controller 224which executes this kind of step functions as the loop avoidanceinstruction transmitter. If there is not already a connection (if thesource of the “loop detection packet” is not a downstream apparatus ofits own apparatus), the controller 224 skips the transmission process ofstep S46.

Then, in step S47, the controller 224 records a reception event (forexample, a node ID, location information, and sequence number of thedistribution source, and a reception time) of the “loop detection packet(loop connection detection information)” in the loop detection packetregistration table 221. In this case, the controller 224 deletes therecording when a certain time (for example, a time which is the same asthe time interval at which the “loop detection packet” is transmittedand the existence of a loop is investigated) has elapsed. The controller224 which executes this kind of step functions as the loop detectioninformation memory.

Then, in steps S48 and S49, the controller 224 investigates, by means ofthe node management table, whether or not a downstream apparatus existsimmediately below its own apparatus and, if one exists, relays the “loopdetection packet (loop connection detection information)” to thedownstream apparatus. If one does not exist, the controller 224 does notcarry out the relay. The controller 224 which executes this kind of stepfunctions as the loop detection information relay.

Meanwhile, in step S50, the controller 224 receives the “loop avoidanceinstruction message (loop connection avoidance instructioninformation)”. The controller 224 which executes this kind of stepfunctions as the loop avoidance instruction receiver. Then, in step S51,the controller 224 transmits a “substitute upstream node search packetdistribution request message (a search information distributionrequest)”, including identification information (a node identifier,location information and the like of its own apparatus) for identifyingits own apparatus, to the second node of the 0 system or the 1 system(the terminal apparatus B0 or the terminal apparatus B1), so as torequest a transmission of a “substitute upstream node search packet(substitute upstream terminal apparatus search information)”. Thecontroller 224 which executes this kind of step functions as the searchinformation distribution request transmitter.

Switching to Substitute Upstream Terminal Apparatus After Loop Detection

In step S52, the controller 224 determines whether or not it hasreceived the “substitute upstream node search packet distributionrequest message (the search information distribution request)”,including the identification information (regarding upstream apparatusof the standby system, identification information of a terminalapparatus where a distribution route loop exists). The controller 224which executes this kind of step functions as the search informationdistribution request receiver. Then, if it has received the substituteupstream node search packet distribution request message (step S52:Yes), the controller 224, in steps S53 and S54, with the substituteupstream node search packet distribution request as a trigger,investigates, by means of the node management table, whether or not adownstream apparatus exists immediately below its own apparatus, anddistributes a “substitute upstream node search packet (substituteupstream terminal apparatus search information)”, including theidentification information, toward the downstream apparatus of its ownapparatus. The controller 224 which executes this kind of step functionsas the search information distributor.

Meanwhile, in step S55, the controller 224 determines whether or not ithas received the “substitute upstream node search packet (the substituteupstream terminal apparatus search information)”, including theidentification information. The controller 224 which executes this kindof step functions as the search information receiver. Then, if it hasreceived the substitute upstream node search packet (step S55: Yes), thecontroller 224, in steps S56 and S57, determines whether or not thereexists, in the loop detection packet registration table 221 of its ownapparatus, a recording of a reception event of a “loop detection packet”which the source matches and, if one does not exist, transmits a“substitute upstream node connection permission message (substituteupstream terminal apparatus connection permission information)” to thesource of the “substitute upstream node search packet” (the terminalapparatus indicated by the identification information included in the“substitute upstream node search packet”), informing it that it ispossible to connect as a substitute terminal apparatus for avoiding aloop with respect to an upstream apparatus in the standby system. Thecontroller 224 which executes this kind of step functions as theconnection permission transmitter.

Then, in steps S58 and S59, the controller 224 investigates, by means ofthe node management table, whether or not a downstream apparatus existsimmediately below its own apparatus, and relays the “substitute upstreamnode search packet (the substitute upstream terminal apparatus searchinformation)”, including the identification information, toward thedownstream apparatus of its own apparatus. The controller 224 whichexecutes this kind of step functions as the search information relay.

Meanwhile, in step S60, the controller 224 determines whether or not ithas received the “substitute upstream node connection permission message(the substitute upstream terminal apparatus connection permissioninformation)”. The controller 224 which executes this kind of stepfunctions as the connection permission receiver. Then, if it hasreceived the substitute upstream node connection permission message(step S60: Yes), the controller 224 (the controller 224 of the terminalapparatus where the distribution route loop exists with respect to thestandby system upstream apparatus), in step S61, switches a currentstandby system connection to the source of the “substitute upstream nodeconnection permission message (the substitute upstream terminalapparatus connection permission information)”. The controller 224 whichexecutes this kind of step functions as the substitute upstream terminalconnector. By this means, it is possible to preemptively avoid anoccurrence of a distribution route loop in the standby system.

Connection Candidate Introduction Apparatus

Next, a description will be given of a configuration and processes ofthe connection candidate introduction apparatus C in the informationdistribution system S. FIG. 10 is a diagram showing the configuration ofthe connection candidate introduction apparatus C. The connectioncandidate introduction apparatus C, to which a general server computeris applicable, is configured including a CPU 402, which executespredetermined processes in accordance with a program, a hard disc device403 configured of a topology database 411, in which is stored topologymanagement information relating to the terminal apparatus B, such asnode numbers, IP addresses and connection information, as well as of aterminal management database 412, in which is stored locationinformation and the like of the information distribution apparatus A andthe terminal apparatus B, and the like, a network interface 404, whichcarries out communication, via the internet, with the terminal apparatusB, a rewritable main memory 405, which stores various kinds of programand the like, a peripheral equipment control chip 406, which controls aninput portion of a keyboard 407 and a mouse 408 which can inputpredetermined information, and a video chip 409 which, as well asreceiving image information from the CPU 402 and writing it into aninternal video memory (not shown), displays the information written intothe video memory on a display 410, to be described hereafter. Also,these various kinds of component being mutually connected via a systembus 401, a controller 419 is configured of the CPU 402 and the mainmemory 405.

Main Memory

Also, a terminal management program 413 for managing the locationinformation of the plurality of terminal apparatus B (the IP addressesand port numbers), a topology management program 414 for constructingand managing the mesh type topology according to the plurality ofterminal apparatus B, an operational management program 415, whichcarries out an operational management of an overall process in theconnection candidate introduction apparatus C, an OS program 416 forproviding basic functions of the connection candidate introductionapparatus C as a computer, and a connection destination introductionprogram 417 for selecting an upstream node candidate corresponding to an“upstream node introduction request” transmitted from a terminalapparatus B, and transmitting it to the terminal apparatus B as a searchresult, are stored in the main memory 405. In the controller 419, theCPU 402 retrieves these programs from the main memory 405, and executesfunctions according to each program.

Herein, the operating system program 416, by being retrieved andexecuted by the CPU 402, renders executable the basic functions of thecomputer, which is the connection candidate introduction apparatus C.Then, in a condition in which the operating system program 416 isexecuted by the CPU 402, each program, other than the operating systemprogram 416, stored in the main memory 405 is executed.

It is also acceptable that each program in the main memory 405 is, forexample, downloaded from a server, or the like, connected to theinternet, and stored, and it is also acceptable that, after beingrecorded on a storage medium such as a CD-ROM, they are retrieved via adrive of the storage medium, and stored.

Initialization

In step S101, on the connection candidate introduction apparatus Cstarting up, each kind of program stored in the connection candidateintroduction apparatus C is initialized. After the initialization ofeach kind of program is completed, the connection candidate introductionapparatus C attains a condition in which it can receive request messagesfrom the information distribution apparatus A and the terminal apparatusB.

Registration and Deletion of Information Distribution Apparatus

In steps S102 to S104, the controller 419, if it receives a“registration request” from the information distribution apparatus A bymeans of the terminal management program 413, registers the locationinformation of the information distribution apparatus A in the terminalmanagement database 412, and registers information on a new channel inthe topology database 411. On the other hand, if, in steps S102 to S104,the controller 419 receives a “registration deletion request” from theinformation distribution apparatus A by means of the terminal managementprogram 413, it deletes the location information of the informationdistribution apparatus A from the terminal management database 412, anddeletes the relevant channel information from the topology database 411.

Introduction of Upstream Apparatus Candidate

In steps S106 to S108, the controller 419, if it receives an “upstreamnode introduction request message” from a terminal apparatus B by meansof the connection destination introduction program 417, searches thetopology database 411 for candidates of terminal apparatus B which canbe connected on a downstream side, and transmits two upstream apparatuscandidates to the terminal apparatus B which is the request source as a“search result”.

Topology Information Update

In steps S109 and S110, the controller 419, if it receives a “topologyparticipation report”/“topology withdrawal report” from a terminalapparatus B by means of the topology management program 414, determinesthat there has been a fluctuation in the topology, and updates thetopology database 411.

Heretofore, a description has been given of the configuration andprocesses of the terminal apparatus B and the connection candidateintroduction apparatus C but, with respect to the informationdistribution apparatus A, as no configuration or process indicatingfeatures of the invention is included, a description will be omittedhere.

As heretofore described, according to the embodiment of the invention,in the information distribution system S, a terminal apparatus B whichhas received a “loop detection packet” from upstream determines whetheror not a terminal apparatus connected downstream in the standby systemwhich is a control path which is not a distribution route of the activesystem, and the source of the “loop detection packet” match and, in theevent that they match, determines that a loop will occur in the standbysystem. By this means, it is possible to determine in advance that aloop will occur involving the standby system upstream apparatus, beforeactually switching from the active system to the standby system. Thatis, as the loop detection in the standby system is determined dependingon whether or not the identification number of the terminal apparatusconnected in the standby system, and the identification number of thesource of the “loop detection packet”, match, the detection is possibleby means of a simple method. Also, in Japanese Unexamined PatentPublication No. 2000-49779 indicated in background technology, aspackets for detecting loops are transmitted in an upstream direction,there is a tendency for the packets to concentrate in a specificterminal apparatus. In response to this, in the embodiment of theinvention, as the “loop detection packets” are transmitted in adownstream direction, it being unlikely, unlike Japanese UnexaminedPatent Publication No. 2000-49779, that the packets concentrate in aspecific terminal apparatus, it is possible to reduce a processing load.

Also, according to the embodiment of the invention, after determining inadvance that a loop will occur in the standby system in the event ofswitching from the active system to the standby system, a “substituteupstream node search packet” is transmitted in a downstream directionfrom the terminal apparatus B0 and B1, which are the second nodes, and aterminal apparatus which is a terminal apparatus which has received the“substitute upstream node search packet”, but has not received a “loopdetection packet”, is made a substitute upstream apparatus. By thismeans, it being possible to switch to the substitute upstream apparatus,with which no loop occurs, in place of a terminal apparatus with which aloop occurs, as the upstream terminal apparatus in the standby system,it is possible to avoid a loop in the standby system. That is, theavoidance of the loop is possible by means of a simple method.

In this way, in the embodiment of the invention, the loop detectioninvolving the upstream apparatus in the standby system, and thespecification of a substitute upstream apparatus with which a loop doesnot occur, are carried out before actually switching from the activesystem to the standby system. To date, a loop has only been noticedafter switching from the active system to the standby system but, as itis possible to avoid a loop condition in advance, it is possible toincrease reliability as the information distribution system S. Also, inthe embodiment, an example is shown of a case of switching the upstreamapparatus from the active system to the standby system, but it is alsopossible to apply the invention in the same way in a case of switchingthe upstream apparatus from the standby system to the active system.

Modification Examples

Hereafter, a description will be given of modification examples of theembodiment of the invention. In the embodiment, it is arranged in such away that the terminal apparatus B, maintaining the predetermined timeinterval, regularly transmits a “loop detection packet” downstream alongthe distribution routes, and repeats an investigation into whether ornot a distribution route loop will occur in the standby system, but itis also acceptable to arrange in such a way that a timing oftransmitting the “loop detection packet”, and repeating theinvestigation into the occurrence of the loop, is carried out at random.In this case, the loop detection information transmitter in thecontroller of the terminal apparatus B functions in such a way as totransmit the “loop detection packet” at randomly set time intervals. Forexample, in the embodiment, in a case of making two a maximum numberconnected on the downstream side of the terminal apparatus B, even whenone million terminal apparatus B participate in the informationdistribution system S, as at most 20 nodes exist in a route path (a pathfrom the terminal apparatus to the information distribution apparatus A,which is a contents source), a probability of a concentration of trafficoccurring is basically low but, in the event of the heretofore describedmodification example being added, it is possible to further reduce theprobability of the concentration occurring.

Also, in the embodiment, it is arranged in such a way that the terminalapparatus B relays the “loop detection packet” as far as a farthestdownstream terminal apparatus (a leaf node) which forms the mesh typetopology, but it is also acceptable to provide an area in the “loopdetection packet” in which to record a relay count, increase the relaycount after every relay, relay the packet in the event that a presetthreshold has not been reached, and stop the relay of the packet in theevent the preset threshold has been reached or exceeded. Generally, aloop existing in a distribution route having a size, a loop with a smallnumber of loop route relay stages (a small loop) occurs in a case inwhich there is a small hierarchical gap in upstream terminal apparatusbetween the active system and the standby system in each terminalapparatus B. A loop with a large number of loop route relay stages (alarge loop) occurs in a case in which there is a large hierarchical gapin upstream terminal apparatus between the active system and the standbysystem in each terminal apparatus B. Therein, in the case of switchingfrom the upstream apparatus of the active system to the upstreamapparatus of the standby system in the terminal apparatus B, normally,by controlling in such a way as to contain the hierarchical gap in theupstream apparatus between the active system and the standby system ator below a certain standard, as it is only possible for a small loop tooccur, it is not necessary for the terminal apparatus B to forward the“loop detection packet” as far as the farthest downstream terminalapparatus. According to the heretofore described modification example,as a “loop detection packet” relay process count in the terminalapparatus B is limited, it being possible to reduce a total of “loopdetection packets” which the terminal apparatus B has to relay, it ispossible to reduce the processing load.

Also, in the embodiment, it is arranged in such a way that the terminalapparatus B0 and B1, which are the second nodes, transmit a “substituteupstream node search packet” in a downstream direction, and search for asubstitute upstream apparatus. In this case, it is conceivable that alarge number of terminal apparatus are suited to be substitute upstreamapparatus. This being so, a “substitute upstream node connectionpermission message” being returned to the source from the suitablesubstitute upstream apparatus, a concentration of packets occurs. Inresponse to this, in the modification example, the terminal apparatus B0and B1, which are the second nodes, attach a connection condition (forexample, a condition of connecting only in the event that AS (AutonomousSystem) numbers and/or ISP names match) to the “substitute upstream nodesearch packet”, the terminal apparatus B receives the “substituteupstream node search packet” and, at a time of a substitute upstreamapparatus suitability process, in the event that it meets the connectioncondition, returns a “substitute upstream node connection permissionmessage”. In this case, the connection permission transmitter in thecontroller of the terminal apparatus B functions in the way heretoforedescribed. By this means, it being possible to avoid the concentrationof the packets, it is possible to reduce the processing load.

Also, the invention is not limited to the heretofore describedembodiment. The embodiment being an illustration, an article having aconfiguration essentially identical to a technological idea described inthe claims of the invention is included, in whatever case, in thetechnological scope of the invention.

Also, the entire contents of Japanese patent Application No.2007-121199, including specifications, claims, drawings and abstract,filed on May 1, 2007 are incorporated herein by reference.

Although the embodiment and modifications of the present invention havebeen described in detail herein, the scope of the invention is notlimited thereto. It will be appreciated by those skilled in the art thatvarious modifications may be made without departing from the scope ofthe invention. Accordingly, the embodiment and modifications disclosedherein are only exemplary. It is to be understood that the scope of theinvention is not to be limited thereby, but is to be determined by theclaims which follow.

1. A terminal apparatus in an information distribution system whichincludes: an information distribution apparatus which distributescontents information via a network; and a plurality of the terminalapparatus which, being connected to the network, receive the contentsinformation distributed from the information distribution apparatus, andin which a plurality of hierarchical structures, formed by the pluralityof terminal apparatus being logically connected in multiple layers withthe information distribution apparatus as an apex, are provided on thenetwork, and the terminal apparatus, in a condition in which theterminal apparatus participates in a first hierarchical structure and asecond hierarchical structure which constitutes at least two of thehierarchical structures, receives the contents information from anupstream terminal apparatus connected to the terminal apparatus in thefirst hierarchical structure or the second hierarchical structure, theterminal apparatus comprising: a loop detection information transmitterwhich transmits loop connection detection information includingidentification information for identifying the terminal apparatus, to adownstream terminal apparatus which is connected to the terminalapparatus receiving the contents information from the terminalapparatus; a loop detection information receiver which receives the loopconnection detection information; a loop detection information relaywhich relays the received loop connection detection information to thedownstream terminal apparatus connected to the terminal apparatusreceiving the contents information from the terminal apparatus; adownstream terminal determiner which determines whether or not aterminal apparatus corresponding to the received loop connectiondetection information is a downstream terminal apparatus connected tothe terminal apparatus in the plurality of hierarchical structures; aloop avoidance instruction transmitter which, in the event that it isdetermined, by the downstream terminal determiner, that the terminalapparatus corresponding to the received loop connection detectioninformation is the downstream terminal apparatus connected to theterminal apparatus, transmits loop connection avoidance instructioninformation, which instructs an avoidance of a loop connection, to theterminal apparatus corresponding to the loop connection detectioninformation; a loop avoidance instruction receiver which receives theloop connection avoidance instruction information; and a controller thatavoids a loop connection occurring in a distribution route of thecontents information by not setting an upstream terminal apparatus to aterminal apparatus which has transmitted the loop connection avoidanceinstruction information, when the terminal apparatus switches theupstream terminal apparatus connected to the terminal apparatus in thefirst hierarchical structure to the upstream apparatus connected to theterminal apparatus in the second hierarchical structure.
 2. The terminalapparatus according to claim 1, wherein the controller further includes:a loop detection information memory which stores the received loopconnection detection information for a predetermined time; a searchinformation distribution request transmitter which, with the receptionof the loop connection avoidance instruction information by means of theloop avoidance instruction receiver as a trigger, transmits a searchinformation distribution request, including identification informationfor identifying its own apparatus, requesting a distribution ofsubstitute upstream terminal apparatus search information to a terminalapparatus connected to the information distribution apparatus in apredetermined one of the hierarchical structures; a search informationdistribution request receiver which receives the search informationdistribution request; a search information distributor which, with thereception of the search information distribution request as a trigger,distributes the substitute upstream terminal apparatus searchinformation to a downstream terminal apparatus connected to its ownapparatus; a search information receiver which receives the substituteupstream terminal apparatus search information; a search informationrelay which relays the received substitute upstream terminal apparatussearch information to a downstream terminal apparatus connected to itsown apparatus in the predetermined hierarchical structure; a connectionpermission transmitter which, in the event that the loop connectiondetection information relating to a terminal apparatus corresponding tothe received substitute upstream terminal apparatus search informationis not stored in the loop detection information memory, transmitssubstitute upstream terminal apparatus connection permissioninformation, permitting a connection to a downstream side of its ownapparatus, to a terminal apparatus corresponding to the substituteupstream terminal apparatus search information; a connection permissionreceiver which receives the substitute upstream terminal apparatusconnection permission information; and a substitute upstream terminalconnector which connects the terminal apparatus which has transmittedthe substitute upstream terminal apparatus connection permissioninformation.
 3. The terminal apparatus according to claim 1, wherein theloop detection information transmitter, maintaining a time interval,repeatedly transmits the loop connection detection information.
 4. Theterminal apparatus according to claim 3, wherein the loop detectioninformation transmitter randomly sets the time interval at which ittransmits the loop connection detection information.
 5. The terminalapparatus according to claim 1, wherein the loop connection detectioninformation including a relay count recording area in which to recordthe count of relays by the loop detection information relay, the loopdetection information relay, in the event that a relay count recorded inthe relay count recording area is smaller than a predeterminedthreshold, relays the loop connection detection information.
 6. Theterminal apparatus according to claim 2, wherein the substitute upstreamterminal apparatus search information including a predeterminedcondition recording area, in which is recorded a predetermined conditionrelating to the terminal apparatus, the connection permissiontransmitter, in the event that its own apparatus meets the predeterminedcondition included in the substitute upstream terminal apparatus searchinformation, transmits the substitute upstream terminal apparatusconnection permission information.
 7. A terminal apparatus according toclaim 1, wherein the controller, when the terminal apparatus switchesthe upstream terminal apparatus which receives the contents informationfrom the upstream terminal apparatus connected to the terminal apparatusin the first hierarchical structure to the upstream terminal apparatusconnected to the terminal apparatus in the second hierarchicalstructure, by switching an upstream terminal apparatus from the terminalapparatus which has transmitted the loop connection avoidanceinstruction information to another terminal apparatus which differs fromthe terminal apparatus which has transmitted the loop connectionavoidance instruction information, avoids the loop connection occurringin the distribution route of the contents information.
 8. Anon-transitory recording medium, on which a program for causing acomputer to function as each component of the terminal apparatusaccording to claim 1 is recorded so as to be readable by the computer.9. An information distribution system comprising: an informationdistribution apparatus which distributes contents information via anetwork; and a plurality of terminal apparatus which, being connected tothe network, receive the contents information distributed from theinformation distribution apparatus, wherein a plurality of hierarchicalstructures, formed by the plurality of terminal apparatus beinglogically connected in multiple layers with the information distributionapparatus as an apex, are provided on the network, and the terminalapparatus, in a condition in which the terminal apparatus participatesin a first hierarchical structure and a second hierarchical structurewhich constitutes at least two of the hierarchical structures, receivesthe contents information from an upstream terminal apparatus connectedto the terminal apparatus in the first hierarchical structure or thesecond hierarchical structure, the terminal apparatus including: a loopdetection information transmitter which maintains a time interval, andrepeatedly transmits loop connection detection information, includingidentification information for identifying the terminal apparatus, to adownstream terminal apparatus which is connected to the terminalapparatus receiving the contents information from the terminalapparatus; a loop detection information receiver which receives the loopconnection detection information; a loop detection information relaywhich relays the received loop connection detection information to thedownstream terminal apparatus, connected to the terminal apparatusreceiving the contents information from the terminal apparatus; adownstream terminal determiner which determines whether or not aterminal apparatus corresponding to the received loop connectiondetection information is a downstream terminal apparatus connected tothe terminal apparatus in the plurality of hierarchical structures; aloop avoidance instruction transmitter which, in the event that it isdetermined, by means of the downstream terminal determiner, that theterminal apparatus corresponding to the received loop connectiondetection information is the downstream terminal apparatus connected tothe terminal apparatus, transmits loop connection avoidance instructioninformation, which instructs an avoidance of a loop connection, to theterminal apparatus corresponding to the loop connection detectioninformation; a loop avoidance instruction receiver which receives theloop connection avoidance instruction information; and a controller thatavoids a loop connection occurring in a distribution route of thecontents information by not setting an upstream terminal apparatus to aterminal apparatus which has transmitted the loop connection avoidanceinstruction information when the terminal apparatus switches theupstream terminal apparatus connected to the terminal apparatus in thefirst hierarchical structure to the upstream apparatus connected to theterminal apparatus in the second hierarchical structure.
 10. A loopconnection avoidance method which, in an information distribution systemwhich includes: an information distribution apparatus which distributescontents information via a network; and a plurality of terminalapparatus which, being connected to the network, receive the contentsinformation distributed from the information distribution apparatus, andin which a plurality of hierarchical structures, formed by the pluralityof terminal apparatus being logically connected in multiple layers withthe information distribution apparatus as an apex, are provided on thenetwork, and the terminal apparatus, in a condition in which itparticipates in a first hierarchical structure and a second hierarchicalstructure which constitutes at least two of the hierarchical structures,receives the contents information from an upstream terminal apparatusconnected to the terminal apparatus in the first hierarchical structureor the second hierarchical structure, avoids a loop connection occurringin a distribution route of the contents information when the terminalapparatus switches the upstream terminal apparatus, connected to theapparatus itself in the one hierarchical structure and provides thecontents information, to another upstream terminal apparatus, connectedto the apparatus itself in another hierarchical structure, the methodcomprising: a step of the terminal apparatus, maintaining a timeinterval, repeatedly transmitting loop connection detection information,including identification information for identifying the terminalapparatus, to a downstream terminal apparatus which is connected to theterminal apparatus receiving the contents information from the terminalapparatus; a step of the terminal apparatus receiving the loopconnection detection information; a step of the terminal apparatusrelaying the received loop connection detection information to thedownstream terminal apparatus, connected to the terminal apparatusreceiving the contents information from the terminal apparatus; a stepof determining whether or not a terminal apparatus corresponding to thereceived loop connection detection information is a downstream terminalapparatus connected to the terminal apparatus in the plurality ofhierarchical structures; a step of the terminal apparatus, in the eventthat it is determined that the terminal apparatus corresponding to thereceived loop connection detection information is a downstream terminalapparatus connected to the terminal apparatus, transmitting loopconnection avoidance instruction information, which instructs anavoidance of a loop connection, to the terminal apparatus correspondingto the loop connection detection information; a step of receiving theloop connection avoidance instruction information; and a step of,avoiding a loop connection occurring in a distribution route of thecontents information by not setting an upstream terminal apparatus to aterminal apparatus which has transmitted the loop connection avoidanceinstruction information when the terminal apparatus switches theupstream terminal apparatus connected to the terminal apparatus in thefirst hierarchical structure to the upstream apparatus connected to theterminal apparatus in the second hierarchical structure.